<?php

namespace app\h5api\validate;

use think\Validate;

class Member extends Validate
{
    protected $scene = [
        'member' => ['phone','real_name'],
    ];

    protected $rule =   [
        'phone' => 'require|mobile',
        'real_name' => 'require|chsAlphaNum',
    ];

    protected $message  =   [
        'phone.require' => '手机号必须',
        'phone.mobile' => '请输入正确的手机号',
        'real_name.require' => '真实姓名必须',
        'real_name.chsAlphaNum' => '姓名只能是汉字、字母和数字',
    ];
}
